In a voice service, problems such as a voice packet loss and a voice packet error frequently occur in a weak coverage scenario, an interference scenario, and a high-speed movement scenario. This inevitably causes poor user experience due to intermittence, noise, or the like.
An existing frame loss compensation method is as follows. Bitstream analysis is performed on a decoder to determine whether a current frame is a lost frame. If the current frame is a lost frame, a parameter of the current lost frame is estimated, a spectrum frequency parameter and an excitation signal that are of the lost frame are recovered according to the parameter of the current lost frame and a parameter of a history frame, and a signal of the lost frame is further obtained according to the spectrum frequency parameter and the excitation signal; or if the current frame is a normal frame, a parameter of the current frame is obtained by means of decoding, and if the current frame is a normal frame and a previous frame is a lost frame, the parameter of the current frame is corrected according to a parameter of the previous frame, a spectrum frequency parameter and an excitation signal that are of the current frame are obtained according to a corrected parameter, and a signal of the current frame is synthesized according to the spectrum frequency parameter and the excitation signal. The foregoing frame parameter includes at least one of parameters such as a signal type, signal energy, and a signal phase.
Because the parameter of the lost frame is not accurately estimated in the foregoing method, audio decoding quality cannot be ensured.